<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  <title>配送方式配置</title>
	<link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
	<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  <link rel="stylesheet" href="../static/web/css/admin.css">
</head>
<style>
  .fontOrange {
    COLOR: #ff4e00
  }
  .npvar {
    width: 90%
  }
</style>
<body>
  <center>
    <form action="shops_delivery.php" method="post" name="form1">
      <input type="hidden" name="do" value="add">
      <table width="100%" cellpadding="1" cellspacing="1" class="table maintable mt-3 sysinfo">
        <tr height="26" align="center">
          <td height="26" colspan="2" align="left" background="../static/web/img/tbg.gif" style="padding-left:10px">增加一个配送方式</td>
        </tr>
        <tr height="26" align="center">
          <td width="10%" height="26" align="right">
            &nbsp;&nbsp;名称：
          </td>
          <td align="left"><input name="dname" type="text" id="dname" style="width:160px">
            &nbsp;*此处填写配送方式名称</td>
        </tr>
        <tr height="26" align="center">
          <td width="10%" height="26" align="right">
            &nbsp;&nbsp;手续费：
          </td>
          <td align="left">
            <input name="price" type="text" id="price" value="0.00" style="width:60px">
            元
            &nbsp;*发货时所用的手续费，若要收取，请填写(精确到小数位两位)
          </td>
        </tr>
        <tr height="26" align="center">
          <td width="10%" height="26" align="right">
            &nbsp;&nbsp;简要说明：
          </td>
          <td align="left">
            <textarea name="des" id="des" style="width:360px;height:50px"></textarea>
            &nbsp;最多100个文字内，简要说明一下
          </td>
        </tr>
        <tr>
          <td height="50" colspan="3" align="center">
            <table width="200" cellspacing="1" cellpadding="1" class="table table-borderless">
              <tr align="center">
                <td>
                  <button type="submit" class='btn btn-success btn-sm'>添加</button>
                  <button type="reset" name="button" class='btn btn-success btn-sm'>重置</button>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </form>
    <form action="shops_delivery.php" method="post" name="form2">
      <input type="hidden" name="do" value="edit">
      <table width="98%" cellpadding="1" cellspacing="1" align="center" class="table maintable mt-3 mb-3"> 
        <tr>
          <td height="26" colspan="3" align="left" background="../static/web/img/tbg.gif">已有配送方式列表</td>
        </tr>
        <tr>
          <td colspan="3" align="center" style="border-top:0">
            <table width="100%" cellpadding="1" cellspacing="2" class="table">
              <?php foreach($deliveryarr as $rs) { ?>
              <input type="hidden" name="pid[]" value="<?php echo $rs['pid']; ?>">
              <tr>
                <td width="30%" height="26" align="left">
                  <input name="m_dname<?php echo $rs['pid']; ?>" type="text" value="<?php echo $rs['dname']; ?>">
                  <a class="btn btn-success btn-sm" href="shops_delivery.php?do=del&id=<?php echo $rs['pid']; ?>" onClick="return(confirm('删除后无法恢复，您确定删除吗'))">删除</a>
                </td>
                <td width="70%" align="left">
                  手续费：<input name="m_price<?php echo $rs['pid']; ?>" type="text" id="m_price<?php echo $rs['pid']; ?>" value="<?php echo $rs['price']; ?>" style="width:60px">
                  元
                  <textarea name="m_des<?php echo $rs['pid']; ?>" id="m_des<?php echo $rs['pid']; ?>" style="width:360px;height:50px"><?php echo $rs['des']; ?></textarea>
                </td>
              </tr>
              <?php }?>
            </table>
          </td>
        </tr>
        <tr>
          <td bgcolor="#f8f8f8" colspan="3" align="center" class="py-3">
            <button name="imageField2" type="submit" class="btn btn-success btn-sm">保存</button>
          </td>
        </tr>
      </table>
    </form>
  </center>
</body>
</html>